<!DOCTYPE html>
<html lang="zh">
  <head>
    <meta charset="UTF-8" />
    <title>绿湖环保客户端大屏</title>
    <link rel="shortcut icon" href="img/logo.png" type="image/x-icon" />
    <link rel="stylesheet" href="css/style.css" />
    <link rel="stylesheet" href="css/style_th.css" />
    <script src="js/vue.min.js"></script>
    <script src="js/jquery.min.js"></script>
    <script src="js/echarts.min.js"></script>
    <script src="js/moment.js"></script>
    <!--接口-->
    <script src="js/axios.min.js"></script>
    <script src="js/request.js"></script>
    <script src="js/api.js"></script>
    <!-- 引入样式 -->
    <link
      rel="stylesheet"
      href="https://unpkg.com/element-ui/lib/theme-chalk/index.css"
    />
    <!-- 引入组件库 -->
    <script src="https://unpkg.com/element-ui/lib/index.js"></script>
    <style type="text/css">
      * {
        padding: 0;
        margin: 0;
      }

      html,
      body {
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 1);
      }

      [v-cloak] {
        display: none !important;
      }

      #outerSizeAPosition {
        width: 100%;
        height: 67.5rem;
        /*background-image: url(img/main-bg.png);*/
        /*background-repeat: no-repeat;*/
        /*background-position: center center;*/
        /*background-size: cover;*/
        background-color: rgba(0, 0, 0, 1);
        overflow-x: hidden;
        overflow-y: auto;
        -moz-user-select: none;
        -webkit-user-select: none;
        user-select: none;
        position: relative;
        display: flex;
      }
    </style>
  </head>

  <body>
    <div id="outerSizeAPosition">
      <div class="title">
        <div class="titleFont">绿湖环保客户端大屏</div>
      </div>
      <div class="date">
        <div v-cloak>{{ datetime }}</div>
        <!-- <div>晴</div> -->
        <!-- <div>温度23℃</div> -->
      </div>
      <div class="middle">
        <div class="middleImg">
          <img v-show="selectButton===0"   src="img/调整.png" alt="" />
        </div>
        <!-- <div class="backBtn" style="top:60px;left: 40px"
                onclick="window.location.href='#'">
            </div> -->
      </div>
      <!-- 渗滤液坑道间 -->
      <div class="leftBox1">
        <div class="boxTitle">
          <div class="boxTitleText">
            <img src="img/icon.png" alt="" />
            <span> 生产车间</span>
          </div>
          <div class="boxTitleBottom"></div>
        </div>
        <div class="sub">
          <div class="subTitle">1#点位</div>
          <div
            class="boxSub"
            :class="{'boxSubNull':this['1#点位'].status===-1, 'boxSubWarn1':this['1#点位'].status===1, 'boxSubWarn2':this['1#点位'].status===2}"
            @click="showHistory('1#点位')"
          >
            <div class="subList">
              <div class="subListTop">硫化氢</div>
              <div class="subListBottom" v-show="numVisible" id="oneLiuhuaqing">
                {{this['1#点位'].硫化氢.num}}{{this['1#点位'].硫化氢.unit}}
              </div>
            </div>
            <!-- <div class="subList">
              <div class="subListTop">一氧化碳</div>
              <div class="subListBottom" v-show="numVisible" id="oneYiyang">
                {{this['1#点位'].一氧化碳.num}}{{this['1#点位'].一氧化碳.unit}}
              </div>
            </div>
            <div class="subList">
              <div class="subListTop">氧气</div>
              <div class="subListBottom" v-show="numVisible" id="oneYangqi">
                {{this['1#点位'].氧气.num}}{{this['1#点位'].氧气.unit}}
              </div>
            </div> -->
            <div class="subList">
              <div class="subListTop">甲烷</div>
              <div class="subListBottom" v-show="numVisible" id="oneJiawan">
                {{this['1#点位'].甲烷.num}}{{this['1#点位'].甲烷.unit}}
              </div>
            </div>
          </div>
        </div>
        <div class="sub">
          <div class="subTitle">2#点位</div>
          <div
            class="boxSub"
            :class="{'boxSubNull':this['2#点位'].status===-1, 'boxSubWarn1':this['2#点位'].status===1, 'boxSubWarn2':this['2#点位'].status===2}"
            @click="showHistory('2#点位')"
          >
            <div class="subList">
              <div class="subListTop">硫化氢</div>
              <div class="subListBottom" v-show="numVisible" id="twoLiuhuaqing">
                {{this['2#点位'].硫化氢.num}}{{this['2#点位'].硫化氢.unit}}
              </div>
            </div>
            <!-- <div class="subList">
              <div class="subListTop">一氧化碳</div>
              <div class="subListBottom" v-show="numVisible" id="twoYiyang">
                {{this['2#点位'].一氧化碳.num}}{{this['2#点位'].一氧化碳.unit}}
           
              </div>
            </div> -->
            <!-- <div class="subList">
              <div class="subListTop">氧气</div>
              <div class="subListBottom" v-show="numVisible" id="twoYangqi">
                {{this['2#点位'].氧气.num}}{{this['2#点位'].氧气.unit}}
              </div>
              18.26VOL </div>
            </div> -->

            <div class="subList">
              <div class="subListTop">甲烷</div>
              <div class="subListBottom" v-show="numVisible" id="twoJiawan">
                {{this['2#点位'].甲烷.num}}{{this['2#点位'].甲烷.unit}}
              </div>
              <!-- 0.69%LEL </div> -->
            </div>
          </div>
        </div>
      </div>

 

      <!-- 垃圾池 -->
      <div class="rightBox">
        <div class="boxTitle">
          <div class="boxTitleText">
            <img src="img/icon.png" alt="" />
            <span>生产车间</span>
          </div>
          <div class="boxTitleBottom"></div>
        </div>
        <div class="sub">
          <div class="subTitle" style="top: 13.125rem; left: 0.625rem">
            3#点位
          </div>
          <div
            class="boxSub"
            :class="{'boxSubNull':this['1期垃圾池'].status===-1, 'boxSubWarn1':this['1期垃圾池'].status===1, 'boxSubWarn2':this['1期垃圾池'].status===2}"
            @click="showHistory('1期垃圾池')"
          >
            <div class="subList">
              <div class="subListTop">硫化氢</div>
              <div
                class="subListBottom"
                v-show="numVisible"
                id="laOneLiuhuaqing"
              >
                {{this['1期垃圾池'].硫化氢.num}}{{this['1期垃圾池'].硫化氢.unit}}
              </div>
            </div>
            <!-- <div class="subList">
              <div class="subListTop">一氧化碳</div>
              <div class="subListBottom" v-show="numVisible" id="laOneYiyang">
                {{this['1期垃圾池'].一氧化碳.num}}{{this['1期垃圾池'].一氧化碳.unit}}
              </div>
            </div>
            <div class="subList">
              <div class="subListTop">氧气</div>
              <div class="subListBottom" v-show="numVisible" id="laOneYangqi">
                {{this['1期垃圾池'].氧气.num}}{{this['1期垃圾池'].氧气.unit}}
              </div>
            </div> -->
            <div class="subList">
              <div class="subListTop">甲烷</div>
              <div class="subListBottom" v-show="numVisible" id="laOneJiawan">
                {{this['1期垃圾池'].甲烷.num}}{{this['1期垃圾池'].甲烷.unit}}
              </div>
            </div>
          </div>
        </div>
        <!-- <div class="sub">
          <div class="subTitle">4#点位-下料间</div>
          <div
            class="boxSub"
            :class="{'boxSubNull':this['2期垃圾池'].status===-1, 'boxSubWarn1':this['2期垃圾池'].status===1, 'boxSubWarn2':this['2期垃圾池'].status===2}"
            @click="showHistory('2期垃圾池')"
          >
            <div class="subList">
              <div class="subListTop">硫化氢</div>
              <div
                class="subListBottom"
                v-show="numVisible"
                id="laTwoLiuhuaqing"
              >
                {{this['2期垃圾池'].硫化氢.num}}{{this['2期垃圾池'].硫化氢.unit}}
              </div>
            </div>
            <div class="subList">
              <div class="subListTop">一氧化碳</div>
              <div class="subListBottom" v-show="numVisible" id="laTwoYiyang">
                {{this['2期垃圾池'].一氧化碳.num}}{{this['2期垃圾池'].一氧化碳.unit}}
              </div>
            </div>
            <div class="subList">
              <div class="subListTop">氧气</div>
              <div class="subListBottom" v-show="numVisible" id="laTwoYangqi">
                {{this['2期垃圾池'].氧气.num}}{{this['2期垃圾池'].氧气.unit}}
              </div>
            </div>
            <div class="subList">
              <div class="subListTop">甲烷</div>
              <div class="subListBottom" v-show="numVisible" id="laTwoQingqi">
                {{this['2期垃圾池'].甲烷.num}}{{this['2期垃圾池'].甲烷.unit}}
              </div>
            </div>
          </div>
        </div> -->
      </div>

      <div class="bottomBox1">
        <div class="boxTitle">
          <div class="boxTitleText">
            <img src="img/icon1.png" alt="" />
            <span>报警数据</span>
          </div>
          <div class="boxTitleBottom1"></div>
        </div>
        <div class="bottomBoxSub">
          <div
            class="warnBox"
            :class="{'warnBox1':warnAll===2,'warnBox2':warnAll===1 }"
            @click="changeWarnLiCancel()"
          >
            <div class="warnBoxText" v-if="warnAll===0">暂无报警</div>
            <div class="warnBoxText" v-if="warnAll===2" style="color: #ff9999">
              二级报警
            </div>
            <div class="warnBoxText" v-if="warnAll===1" style="color: #ffcc99">
              一级报警
            </div>
          </div>
          <div class="warnList">
            <div
              class="zero"
              style="line-height: 9.375rem"
              v-if="warnList.length===0"
            >
              暂无报警信息
            </div>
            <ul>
              <li
                v-cloak
                v-for="(item, index) in warnList"
                :key="index"
                :class="{'active':item.isClick===true, 'warn':item.level===1, 'warn2':item.level===2}"
                @click="changeWarnLi(item, index)"
              >
                <div
                  style="width: 25%"
                  v-if="item.sceneTypeName||item.scenePointName"
                >
                  {{ item.sceneTypeName }}{{ item.scenePointName }}
                </div>
                <div
                  style="width: 25%"
                  v-if="!item.sceneTypeName&&!item.scenePointName"
                >
                  暂无绑定
                </div>
                <div style="width: 25%" v-if="item.typePid===1">
                  {{ item.hj212Name }}{{ item.number }}{{item.unit}}
                </div>
                <div style="width: 25%" v-if="item.typePid===2">
                  {{ item.typeName }}
                </div>
                <div>{{item.createTime.substring(5, 16)}}</div>
                <div
                  style="width: 15%"
                  v-if="item.status===1||item.status===2||item.status===7"
                >
                  未确认
                </div>
                <div style="width: 15%" v-if="item.status===3||item.status===4">
                  已确认
                </div>
                <div style="width: 15%">
                  <div
                    class="warnType"
                    v-if="item.typePid===1"
                    :class="{'warnType1':item.level===1, 'warnType2':item.level===2}"
                  >
                    数据报警
                  </div>
                  <div
                    class="warnType"
                    v-if="item.typePid===2"
                    :class="{'warnType1':item.level===1, 'warnType2':item.level===2}"
                  >
                    行为报警
                  </div>
                </div>
              </li>
            </ul>
          </div>
        </div>
      </div>

      <div class="bottom"></div>

<!-- 
      <div class="point1" @click="showHistory('1#点位')"></div>
      <div class="point2"   @click="showHistory('2#点位')"></div>
      <div class="point3"      @click="showHistory('1期垃圾池')"></div> -->

      <!--报警弹框 start-->
      <div class="mask" id="mask" v-show="maskVisible"></div>
      <audio
        src="img/warn.mp3"
        autoplay
        loop
        id="audio"
        v-if="maskVisible"
      ></audio>
      <div class="maskPop" v-show="maskVisible">
        <div class="maskText">
          <!-- <div v-for="(item, index) in warnAllList">{{item.detail}}</div> -->
          <div v-for="(item, index) in noticeList">{{item.details}}</div>
        </div>
        <div class="maskButton" @click="maskConfirm()">我知道了</div>
        <!-- <div class="maskButton">我知道了</div> -->
      </div>

      <!--报警弹框 end-->
      <div class="historyBox" v-show="historyVisible">
        <div class="close" @click="closeBox">
          <img src="img/close.png" alt="" />
        </div>
        <div class="historyBoxTitle">{{historyLineTitle}}</div>
        <div class="selectBox_th">
          <el-date-picker
            v-if="active===2"
            v-model="value1"
            type="datetimerange"
            value-format="yyyy-MM-dd HH:mm:ss"
            range-separator="至"
            start-placeholder="开始日期"
            end-placeholder="结束日期"
            @change="chooseDate"
          >
          </el-date-picker>
          <div
            :class="{nowBtn_active:active===1}"
            class="nowBtn"
            href="javascript:;"
            @click="changeButton(1)"
          >
            实时数据
          </div>

          <div
            :class="{nowBtn_active:active===2}"
            href="javascript:;"
            @click="changeButton(2)"
            class="nowBtn"
          >
            历史数据
          </div>
        </div>
        <div id="historyLine" class="historyLine" v-show="lineVisible"></div>
        <div v-show="!lineVisible" class="loading">
          <img src="img/loading.png" alt="" />
        </div>
      </div>
    </div>

    <script type="text/javascript">
      let outer = new Vue({
        el: '#outerSizeAPosition',
        components: {
          // moment
        },
        data: {
          cmsUserId: 218,
          departmentIds: 206,
          datetime: '',
          iCount: '',
          selectButton: 0,
          warnList: [
            // { sceneTypeName: '初沉池2号点位', typePid: 2, typeName: '安环人员 孙建国', level: 0, createTime: '2023-06-03 10:50', status: 1, type: '行为报警'},
          ],
          warnListTime: 1500, // 表格滚动时长
          warnListTimer: '', // 表格滚动定时器
          recordList: [
            // { father:{sceneTypeName: '初沉池2号点位',type: 0}, operatorPositionName: '安环人员', operatorName: '孙建国', status: 10, createTime: '2023-06-03 11:47'},
          ],
          recordListTime: 1500, // 表格滚动时长
          recordListTimer: '', // 表格滚动定时器
          suppliesList: [
            // { name: '安全帽', count: '10', unit: '个'},
          ],
          suppliesVisible: false,
          // 报警动态相关
          maskVisible: false,
          numVisible: true,
          warnBox: [0, 0, 0, 0, 0, 0],
          warnAll: 0,
          warnAllList: [],
          noticeList: [],
          // 历史弹窗
          historyVisible: false,
          lineVisible: false,
          historyLineTitle: '',
          historyLineData: '',
          historyLineName: [],
          historyLineMonth: [],
          // 渗滤液坑道间
          '1#点位': {
            scenePointName: '生产车间',
            sceneTypeId: 4,
            pointName: '1#点位',
            scenePointId: 316,
            sceneId: 100,
            status: 0,
            硫化氢: {
              num: '—',
              unit: '',
              level: 0,
            },
            一氧化碳: {
              num: '—',
              unit: '',
              level: 0,
            },
            氧气: {
              num: '—',
              unit: '',
              level: 0,
            },
            氨气: {
              num: '—',
              unit: '',
              level: 0,
            },
            甲烷: {
              num: '—',
              unit: '',
              level: 0,
            },
            湿度: {
              num: '—',
              unit: '',
              level: 0,
            },
            堵塞: {
              num: '—',
              unit: '',
              level: 0,
            },
            泵状态: {
              num: '—',
              unit: '',
              level: 0,
            },
          },
          '2#点位': {
            scenePointName: '生产车间',
            sceneTypeId: 4,
            pointName: '2#点位',
            scenePointId: 317,
            sceneId: 100,
            status: 0,
            硫化氢: {
              num: '—',
              unit: '',
              level: 0,
            },
            一氧化碳: {
              num: '—',
              unit: '',
              level: 0,
            },
            氧气: {
              num: '—',
              unit: '',
              level: 0,
            },
            氨气: {
              num: '—',
              unit: '',
              level: 0,
            },
            甲烷: {
              num: '—',
              unit: '',
              level: 0,
            },
          },

          //垃圾池
          '1期垃圾池': {
            scenePointName: '生产车间',
            sceneTypeId: 4,
            pointName: '3#点位',
            scenePointId: 318,
            sceneId: 100,
            status: 0,
            硫化氢: {
              num: '—',
              unit: '',
              level: 0,
            },
            一氧化碳: {
              num: '—',
              unit: '',
              level: 0,
            },
            氧气: {
              num: '—',
              unit: '',
              level: 0,
            },
            甲烷: {
              num: '—',
              unit: '',
              level: 0,
            },
          },
          '2期垃圾池': {
            scenePointName: '生产车间',
            sceneTypeId: 4,
            pointName: '4#点位',
            scenePointId: 222,
            sceneId: 80,
            status: 0,
            硫化氢: {
              num: '—',
              unit: '',
              level: 0,
            },
            一氧化碳: {
              num: '—',
              unit: '',
              level: 0,
            },
            氧气: {
              num: '—',
              unit: '',
              level: 0,
            },
            甲烷: {
              num: '—',
              unit: '',
              level: 0,
            },
          },
          active: 1,
          value1: [new Date(), new Date()],
          dialogTitleName: '',
        },
        mounted() {
          // 获取实时传感器数据列表-按场景
          this.getSensorDataReal()
          // 获取报警列表
          this.getWarnList()
          // 获取电子锁进出记录列表
          // this.getLockList()
          // 获取告知消息报警
          this.getWarnNoticeList()
          // 循环 一分钟更新
          var that = this
          this.iCount = setInterval(function () {
            console.log('数据更新')
            // 获取实时传感器数据列表-按场景
            that.getSensorDataReal()
            // 获取告知消息报警
            that.getWarnNoticeList()
            // 获取报警列表
            that.getWarnList()
            // 获取电子锁进出记录列表
            // that.getLockList()
            // }, 1000 * 60)
          }, 1000 * 30)
          // 获取时间
          this.nowTimes()
          // 报警列表滚动取消20230609
          // this.warnListScroll()
          this.recordListScroll()
          this.maskShake()
          // 每隔一段时间整个页面刷新 12小时
          setInterval('location.reload();', 1000 * 43200)

          // this.value1[0] = new Date(this.value1[1]) // 复制 value1[1] 的值
          // this.value1[0].setMinutes(this.value1[0].getMinutes() - 60) // 设置为前一天
        },
        methods: {
          formatDate(date) {
            const year = date.getFullYear()
            const month = String(date.getMonth() + 1).padStart(2, '0') // 月份从 0 开始
            const day = String(date.getDate()).padStart(2, '0')
            const hours = String(date.getHours()).padStart(2, '0')
            const minutes = String(date.getMinutes()).padStart(2, '0')
            const seconds = String(date.getSeconds()).padStart(2, '0')

            return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`
          },
          showTipsGreen(content, height, time) {
            //窗口的宽度
            // let windowWidth  = $(window).width()
            let tipsDiv = '<div class="tipsClass">' + content + '</div>'
            // console.log(tipsDiv)
            $('body').append(tipsDiv)
            $('div.tipsClass')
              .css({
                top: height + 'px',
                // 'left'       : ( windowWidth / 2 ) - 350/2 + 'px',
                right: '3.125rem',
                position: 'absolute',
                'z-index': '9999',
                padding: '.1875rem .3125rem',
                background:
                  'linear-gradient(0deg, rgba(8, 151, 189, 1.0) 0%, rgba(10, 27, 69, 1.0) 100%)',
                'font-size': '1.125rem',
                'font-weight': 'bold',
                margin: '0 auto',
                'text-align': 'center',
                width: '21.875rem',
                height: 'auto',
                color: '#fff',
                opacity: '1',
              })
              .show()
            console.log(tipsDiv)
            setTimeout(function () {
              $('div.tipsClass').fadeOut()
            }, time * 1000)
          },
          // 获取实时传感器数据列表-按场景
          getSensorDataReal() {
            this.warnAllList = [] // 清空报警列表
            sensorDataReal({ cmsUserId: this.cmsUserId }).then((res) => {
              if (res.code == 0) {
                // console.log('实时传感器数据列表-按场景', res)
                for (let i = 0; i < res.data.length; i++) {
                  // console.log('第' + i + '项' + res.data[i].name)
                  switch (res.data[i].icode) {
                    case '0000si1_20241119170045647EbIMU':
                      var pointLevel = []
                      for (
                        let j = 0;
                        j < res.data[i].listDataScenePoint.length;
                        j++
                      ) {
                        switch (res.data[i].listDataScenePoint[j].icode) {
                          case '0000sp3_20241119170205644cQcG4':
                            var status = []
                            for (
                              let k = 0;
                              k <
                              res.data[i].listDataScenePoint[j].listHj212
                                .length;
                              k++
                            ) {
                              switch (
                                res.data[i].listDataScenePoint[j].listHj212[k]
                                  .name
                              ) {
                                case '硫化氢':
                                  if (
                                    res.data[i].listDataScenePoint[j].listHj212[
                                      k
                                    ].realData === null
                                  ) {
                                    this['1#点位'].硫化氢.num = '—'
                                    status.push(-1)
                                    break
                                  }
                                  this['1#点位'].硫化氢.num =
                                    res.data[i].listDataScenePoint[j].listHj212[
                                      k
                                    ].realData.value
                                  this['1#点位'].硫化氢.unit =
                                    res.data[i].listDataScenePoint[j].listHj212[
                                      k
                                    ].realUnit
                                  this['1#点位'].硫化氢.level =
                                    res.data[i].listDataScenePoint[j].listHj212[
                                      k
                                    ].level

                                  // console.log(999,this['1#点位'].硫化氢.level);
                                  pointLevel.push(this['1#点位'].硫化氢.level)
                                  status.push(this['1#点位'].硫化氢.level)
                                  if (this['1#点位'].硫化氢.level === 0) {
                                    document.getElementById(
                                      'oneLiuhuaqing'
                                    ).style.color = '#0EA8A7'
                                    // document.getElementById("twoLiuhuaqing").style.color = "#0EA8A7"
                                    // document.getElementById("thLiuhuaqing").style.color = "#0EA8A7F"
                                  } else if (
                                    this['1#点位'].硫化氢.level === 1
                                  ) {
                                    document
                                      .getElementById('oneLiuhuaqing')
                                      .style.setProperty(
                                        'color',
                                        '#FFCC99',
                                        'important'
                                      )
                                    // document.getElementById("twoLiuhuaqing").style.setProperty("color", "#FFCC99", "important");
                                    // document.getElementById("thLiuhuaqing").style.setProperty("color", "#FFCC99", "important");

                                    this.warnAllList.push({
                                      info: res.data[i].listDataScenePoint[j]
                                        .listHj212[k],
                                      detail:
                                        '渗滤液坑道间-1#点位-硫化氢浓度超标，' +
                                        this['1#点位'].硫化氢.num +
                                        this['1#点位'].硫化氢.unit,
                                    })
                                  } else if (
                                    this['1#点位'].硫化氢.level === 2 ||
                                    this['1#点位'].硫化氢.level === 3
                                  ) {
                                    // document.getElementById("一号点位硫化氢").style.color = "#FF9898";
                                    document
                                      .getElementById('oneLiuhuaqing')
                                      .style.setProperty(
                                        'color',
                                        '#FF9898',
                                        'important'
                                      )
                                    // document.getElementById("twoLiuhuaqing").style.setProperty("color", "#FF9898", "important");
                                    // document.getElementById("thLiuhuaqing").style.setProperty("color", "#FF9898", "important");
                                    this.warnAllList.push({
                                      info: res.data[i].listDataScenePoint[j]
                                        .listHj212[k],
                                      detail:
                                        '渗滤液坑道间-1#点位-硫化氢浓度超标，' +
                                        this['1#点位'].硫化氢.num +
                                        this['1#点位'].硫化氢.unit,
                                    })
                                  }
                                  break
                                case '一氧化碳':
                                  // 保留小数位数从note中获取
                                  if (
                                    res.data[i].listDataScenePoint[j].listHj212[
                                      k
                                    ].realData === null
                                  ) {
                                    this['1#点位'].一氧化碳.num = '—'
                                    status.push(-1)
                                    break
                                  }
                                  this['1#点位'].一氧化碳.num =
                                    res.data[i].listDataScenePoint[j].listHj212[
                                      k
                                    ].realData.value

                                  this['1#点位'].一氧化碳.unit =
                                    res.data[i].listDataScenePoint[j].listHj212[
                                      k
                                    ].realUnit
                                  this['1#点位'].一氧化碳.level =
                                    res.data[i].listDataScenePoint[j].listHj212[
                                      k
                                    ].level
                                  pointLevel.push(this['1#点位'].一氧化碳.level)
                                  status.push(this['1#点位'].一氧化碳.level)
                                  if (this['1#点位'].一氧化碳.level === 0) {
                                    document.getElementById(
                                      'oneYiyang'
                                    ).style.color = '#0EA8A7'
                                    // document.getElementById("twoYiyang").style.color = "#0EA8A7"
                                    // document.getElementById("thYiyang").style.color = "#0EA8A7"
                                  } else if (
                                    this['1#点位'].一氧化碳.level === 1
                                  ) {
                                    document.getElementById(
                                      'oneYiyang'
                                    ).style.color = '#FFCC99'
                                    // document.getElementById("twoYiyang").style.color = "#FFCC99";
                                    // document.getElementById("thYiyang").style.color = "#FFCC99";
                                    this.warnAllList.push({
                                      info: res.data[i].listDataScenePoint[j]
                                        .listHj212[k],
                                      detail:
                                        '渗滤液坑道间-1#点位-一氧化碳浓度超标，' +
                                        this['1#点位'].一氧化碳.num +
                                        this['1#点位'].一氧化碳.unit,
                                    })
                                  } else if (
                                    this['1#点位'].一氧化碳.level === 2 ||
                                    this['1#点位'].一氧化碳.level === 3
                                  ) {
                                    document.getElementById(
                                      'oneYiyang'
                                    ).style.color = '#FF9898'
                                    // document.getElementById("twoYiyang").style.color = "#FF9898";
                                    // document.getElementById("thYiyang").style.color = "#FF9898";
                                    this.warnAllList.push({
                                      info: res.data[i].listDataScenePoint[j]
                                        .listHj212[k],
                                      detail:
                                        '渗滤液坑道间-1#点位-一氧化碳浓度超标，' +
                                        this['1#点位'].一氧化碳.num +
                                        this['1#点位'].一氧化碳.unit,
                                    })
                                  }
                                  break
                                case '氧气':
                                  if (
                                    res.data[i].listDataScenePoint[j].listHj212[
                                      k
                                    ].realData === null
                                  ) {
                                    this['1#点位'].氧气.num = '—'
                                    status.push(-1)
                                    break
                                  }
                                  this['1#点位'].氧气.num =
                                    res.data[i].listDataScenePoint[j].listHj212[
                                      k
                                    ].realData.value
                                  this['1#点位'].氧气.unit =
                                    res.data[i].listDataScenePoint[j].listHj212[
                                      k
                                    ].realUnit
                                  this['1#点位'].氧气.level =
                                    res.data[i].listDataScenePoint[j].listHj212[
                                      k
                                    ].level
                                  pointLevel.push(this['1#点位'].氧气.level)
                                  status.push(this['1#点位'].氧气.level)
                                  if (this['1#点位'].氧气.level === 0) {
                                    document.getElementById(
                                      'oneYangqi'
                                    ).style.color = '#0EA8A7'
                                    // document.getElementById("twoYangqi").style.color = "#0EA8A7"
                                    // document.getElementById("thYangqi").style.color = "#0EA8A7"
                                  } else if (this['1#点位'].氧气.level === 1) {
                                    document.getElementById(
                                      'oneYangqi'
                                    ).style.color = '#FFCC99'
                                    // document.getElementById("twoYangqi").style.color = "#FFCC99";
                                    // document.getElementById("thYangqi").style.color = "#FFCC99";
                                    this.warnAllList.push({
                                      info: res.data[i].listDataScenePoint[j]
                                        .listHj212[k],
                                      detail:
                                        '渗滤液坑道间-1#点位-氧气浓度超标，' +
                                        this['1#点位'].氧气.num +
                                        this['1#点位'].氧气.unit,
                                    })
                                  } else if (
                                    this['1#点位'].氧气.level === 2 ||
                                    this['1#点位'].氧气.level === 3
                                  ) {
                                    document.getElementById(
                                      'oneYangqi'
                                    ).style.color = '#FF9898'
                                    // document.getElementById("twoYangqi").style.color = "#FF9898";
                                    // document.getElementById("thYangqi").style.color = "#FF9898";
                                    this.warnAllList.push({
                                      info: res.data[i].listDataScenePoint[j]
                                        .listHj212[k],
                                      detail:
                                        '渗滤液坑道间-1#点位-氧气浓度超标，' +
                                        this['1#点位'].氧气.num +
                                        this['1#点位'].氧气.unit,
                                    })
                                  }
                                  break

                                case '甲烷':
                                  if (
                                    res.data[i].listDataScenePoint[j].listHj212[
                                      k
                                    ].realData === null
                                  ) {
                                    this['1#点位'].甲烷.num = '—'
                                    status.push(-1)
                                    break
                                  }
                                  this['1#点位'].甲烷.num =
                                    res.data[i].listDataScenePoint[j].listHj212[
                                      k
                                    ].realData.value
                                  this['1#点位'].甲烷.unit =
                                    res.data[i].listDataScenePoint[j].listHj212[
                                      k
                                    ].realUnit
                                  this['1#点位'].甲烷.level =
                                    res.data[i].listDataScenePoint[j].listHj212[
                                      k
                                    ].level
                                  pointLevel.push(this['1#点位'].甲烷.level)
                                  status.push(this['1#点位'].甲烷.level)
                                  if (this['1#点位'].甲烷.level === 0) {
                                    document.getElementById(
                                      'oneJiawan'
                                    ).style.color = '#0EA8A7'
                                    // document.getElementById("twoJiawan").style.color = "#0EA8A7"
                                    // document.getElementById("thJiawan").style.color = "#0EA8A7"
                                  } else if (this['1#点位'].甲烷.level === 1) {
                                    document.getElementById(
                                      'oneJiawan'
                                    ).style.color = '#FFCC99'
                                    // document.getElementById("twoJiawan").style.color = "#FFCC99";
                                    // document.getElementById("thJiawan").style.color = "#FFCC99";
                                    this.warnAllList.push({
                                      info: res.data[i].listDataScenePoint[j]
                                        .listHj212[k],
                                      detail:
                                        '渗滤液坑道间-1#点位-甲烷浓度超标，' +
                                        this['1#点位'].甲烷.num +
                                        this['1#点位'].甲烷.unit,
                                    })
                                  } else if (
                                    this['1#点位'].甲烷.level === 2 ||
                                    this['1#点位'].甲烷.level === 3
                                  ) {
                                    document.getElementById(
                                      'oneJiawan'
                                    ).style.color = '#FF9898'
                                    // document.getElementById("twoJiawan").style.color = "#FF9898";
                                    // document.getElementById("thJiawan").style.color = "#FF9898";
                                    this.warnAllList.push({
                                      info: res.data[i].listDataScenePoint[j]
                                        .listHj212[k],
                                      detail:
                                        '渗滤液坑道间-1#点位-甲烷浓度超标，' +
                                        this['1#点位'].甲烷.num +
                                        this['1#点位'].甲烷.unit,
                                    })
                                  }

                                  break

                                case '湿度检测':
                                  if (
                                    res.data[i].listDataScenePoint[j].listHj212[
                                      k
                                    ].realData === null
                                  ) {
                                    this['1#点位'].湿度.num = '—'
                                    status.push(-1)
                                    break
                                  }

                                  this['1#点位'].湿度.num =
                                    res.data[i].listDataScenePoint[j].listHj212[
                                      k
                                    ].realData.value

                                  // this['1#点位'].湿度.num = 1
                                  // pointLevel.push(this['1#点位'].湿度.num)
                                  // status.push(this['1#点位'].湿度.num)

                                  if (this['1#点位'].湿度.num === 0) {
                                    this['1#点位'].湿度.num = '正常'
                                    document.getElementById(
                                      'oneShidu'
                                    ).style.color = '#0EA8A7'
                                    document.getElementById(
                                      'bengBox'
                                    ).style.background =
                                      'linear-gradient(270deg, rgba(0, 0, 0, 0.3) 0%, rgba(14, 168, 167, 0.3) 100%)'
                                    //    document.getElementById("bengBox").style.borderRadius = "0px 0px 0px 0px";
                                    document.getElementById(
                                      'bengBox'
                                    ).style.borderLeft = ''
                                  } else if (this['1#点位'].湿度.num === 1) {
                                    this['1#点位'].湿度.num = '异常'
                                    document
                                      .getElementById('oneShidu')
                                      .style.setProperty(
                                        'color',
                                        '#FFCC99',
                                        'important'
                                      )
                                    document.getElementById(
                                      'bengBox'
                                    ).style.background =
                                      'linear-gradient(270deg, rgba(0, 0, 0, 0.3) 0%, rgba(255, 179, 114, 0.3) 100%)'
                                    document.getElementById(
                                      'bengBox'
                                    ).style.borderLeft = '3px solid #FFB372'
                                    // this.warnAllList.push({ info: res.data[i].listDataScenePoint[j].listHj212[k], detail: '渗滤液坑道间-1#点位-湿度异常，' + this['1#点位'].湿度.num + this['1#点位'].湿度.unit })
                                  }
                                  break
                                case '堵塞检测':
                                  if (
                                    res.data[i].listDataScenePoint[j].listHj212[
                                      k
                                    ].realData === null
                                  ) {
                                    this['1#点位'].堵塞.num = '—'
                                    status.push(-1)
                                    break
                                  }
                                  this['1#点位'].堵塞.num =
                                    res.data[i].listDataScenePoint[j].listHj212[
                                      k
                                    ].realData.value
                                  // this['1#点位'].堵塞.num = 1
                                  // pointLevel.push(this['1#点位'].堵塞.num)
                                  // status.push(this['1#点位'].堵塞.num)

                                  if (this['1#点位'].堵塞.num === 0) {
                                    this['1#点位'].堵塞.num = '正常'
                                    document.getElementById(
                                      'oneDuse'
                                    ).style.color = '#0EA8A7'
                                    document.getElementById(
                                      'bengBox'
                                    ).style.background =
                                      'linear-gradient(270deg, rgba(0, 0, 0, 0.3) 0%, rgba(14, 168, 167, 0.3) 100%)'
                                    //    document.getElementById("bengBox").style.borderRadius = "0px 0px 0px 0px";
                                    document.getElementById(
                                      'bengBox'
                                    ).style.borderLeft = ''
                                  } else if (this['1#点位'].堵塞.num === 1) {
                                    this['1#点位'].堵塞.num = '异常'
                                    document
                                      .getElementById('oneDuse')
                                      .style.setProperty(
                                        'color',
                                        '#FFCC99',
                                        'important'
                                      )
                                    document.getElementById(
                                      'bengBox'
                                    ).style.background =
                                      'linear-gradient(270deg, rgba(0, 0, 0, 0.3) 0%, rgba(255, 179, 114, 0.3) 100%)'
                                    document.getElementById(
                                      'bengBox'
                                    ).style.borderLeft = '3px solid #FFB372'
                                    // this.warnAllList.push({ info: res.data[i].listDataScenePoint[j].listHj212[k], detail: '渗滤液坑道间-1#点位-堵塞异常，' + this['1#点位'].堵塞.num + this['1#点位'].堵塞.unit })
                                  }
                                  break

                                case '泵状态':
                                  if (
                                    res.data[i].listDataScenePoint[j].listHj212[
                                      k
                                    ].realData === null
                                  ) {
                                    this['1#点位'].泵状态.num = '—'
                                    status.push(-1)
                                    break
                                  }

                                  this['1#点位'].泵状态.num =
                                    res.data[i].listDataScenePoint[j].listHj212[
                                      k
                                    ].realData.value
                                  // this['1#点位'].泵状态.num = 0
                                  // pointLevel.push(this['1#点位'].泵状态.num)
                                  // status.push(this['1#点位'].泵状态.num)

                                  if (this['1#点位'].泵状态.num === 1) {
                                    this['1#点位'].泵状态.num = '正常'
                                    document.getElementById(
                                      'oneBeng'
                                    ).style.color = '#0EA8A7'
                                    document.getElementById(
                                      'bengBox'
                                    ).style.background =
                                      'linear-gradient(270deg, rgba(0, 0, 0, 0.3) 0%, rgba(14, 168, 167, 0.3) 100%)'
                                    //    document.getElementById("bengBox").style.borderRadius = "0px 0px 0px 0px";
                                    document.getElementById(
                                      'bengBox'
                                    ).style.borderLeft = ''
                                  } else if (this['1#点位'].泵状态.num === 0) {
                                    this['1#点位'].泵状态.num = '异常'
                                    document
                                      .getElementById('oneBeng')
                                      .style.setProperty(
                                        'color',
                                        '#FFCC99',
                                        'important'
                                      )
                                    document.getElementById(
                                      'bengBox'
                                    ).style.background =
                                      'linear-gradient(270deg, rgba(0, 0, 0, 0.3) 0%, rgba(255, 179, 114, 0.3) 100%)'
                                    document.getElementById(
                                      'bengBox'
                                    ).style.borderLeft = '3px solid #FFB372'
                                    // this.warnAllList.push({ info: res.data[i].listDataScenePoint[j].listHj212[k], detail: '渗滤液坑道间-1#点位-堵塞异常，' + this['1#点位'].泵状态.num + this['1#点位'].泵状态.unit })
                                  }

                                  break
                              }
                            }
                            this['1#点位'].status = Math.max.apply(null, status)
                            break

                          case '0000sp3_2024111917021822463LeX':
                            var status = []
                            for (
                              let k = 0;
                              k <
                              res.data[i].listDataScenePoint[j].listHj212
                                .length;
                              k++
                            ) {
                              switch (
                                res.data[i].listDataScenePoint[j].listHj212[k]
                                  .name
                              ) {
                                case '硫化氢':
                                  if (
                                    res.data[i].listDataScenePoint[j].listHj212[
                                      k
                                    ].realData === null
                                  ) {
                                    this['2#点位'].硫化氢.num = '—'
                                    status.push(-1)
                                    break
                                  }
                                  this['2#点位'].硫化氢.num =
                                    res.data[i].listDataScenePoint[j].listHj212[
                                      k
                                    ].realData.value
                                  this['2#点位'].硫化氢.unit =
                                    res.data[i].listDataScenePoint[j].listHj212[
                                      k
                                    ].realUnit
                                  this['2#点位'].硫化氢.level =
                                    res.data[i].listDataScenePoint[j].listHj212[
                                      k
                                    ].level

                                  pointLevel.push(this['2#点位'].硫化氢.level)
                                  status.push(this['2#点位'].硫化氢.level)
                                  if (this['2#点位'].硫化氢.level === 0) {
                                    document.getElementById(
                                      'twoLiuhuaqing'
                                    ).style.color = '#0EA8A7'
                                  } else if (
                                    this['2#点位'].硫化氢.level === 1
                                  ) {
                                    document
                                      .getElementById('twoLiuhuaqing')
                                      .style.setProperty(
                                        'color',
                                        '#FFCC99',
                                        'important'
                                      )

                                    this.warnAllList.push({
                                      info: res.data[i].listDataScenePoint[j]
                                        .listHj212[k],
                                      detail:
                                        '渗滤液坑道间-2#点位-硫化氢浓度超标，' +
                                        this['2#点位'].硫化氢.num +
                                        this['2#点位'].硫化氢.unit,
                                    })
                                  } else if (
                                    this['2#点位'].硫化氢.level === 2 ||
                                    this['2#点位'].硫化氢.level === 3
                                  ) {
                                    // document.getElementById("一号点位硫化氢").style.color = "#FF9898";
                                    document
                                      .getElementById('twoLiuhuaqing')
                                      .style.setProperty(
                                        'color',
                                        '#FF9898',
                                        'important'
                                      )
                                    this.warnAllList.push({
                                      info: res.data[i].listDataScenePoint[j]
                                        .listHj212[k],
                                      detail:
                                        '渗滤液坑道间-2#点位-硫化氢浓度超标，' +
                                        this['2#点位'].硫化氢.num +
                                        this['2#点位'].硫化氢.unit,
                                    })
                                  }
                                  break
                                case '一氧化碳':
                                  // 保留小数位数从note中获取
                                  if (
                                    res.data[i].listDataScenePoint[j].listHj212[
                                      k
                                    ].realData === null
                                  ) {
                                    this['2#点位'].一氧化碳.num = '—'
                                    status.push(-1)
                                    break
                                  }
                                  this['2#点位'].一氧化碳.num =
                                    res.data[i].listDataScenePoint[j].listHj212[
                                      k
                                    ].realData.value

                                  this['2#点位'].一氧化碳.unit =
                                    res.data[i].listDataScenePoint[j].listHj212[
                                      k
                                    ].realUnit
                                  this['2#点位'].一氧化碳.level =
                                    res.data[i].listDataScenePoint[j].listHj212[
                                      k
                                    ].level
                                  pointLevel.push(this['2#点位'].一氧化碳.level)
                                  status.push(this['2#点位'].一氧化碳.level)
                                  if (this['2#点位'].一氧化碳.level === 0) {
                                    document.getElementById(
                                      'twoYiyang'
                                    ).style.color = '#0EA8A7'
                                  } else if (
                                    this['2#点位'].一氧化碳.level === 1
                                  ) {
                                    document.getElementById(
                                      'twoYiyang'
                                    ).style.color = '#FFCC99'
                                    this.warnAllList.push({
                                      info: res.data[i].listDataScenePoint[j]
                                        .listHj212[k],
                                      detail:
                                        '渗滤液坑道间-2#点位-一氧化碳浓度超标，' +
                                        this['2#点位'].一氧化碳.num +
                                        this['2#点位'].一氧化碳.unit,
                                    })
                                  } else if (
                                    this['2#点位'].一氧化碳.level === 2 ||
                                    this['2#点位'].一氧化碳.level === 3
                                  ) {
                                    document.getElementById(
                                      'twoYiyang'
                                    ).style.color = '#FF9898'
                                    this.warnAllList.push({
                                      info: res.data[i].listDataScenePoint[j]
                                        .listHj212[k],
                                      detail:
                                        '渗滤液坑道间-2#点位-一氧化碳浓度超标，' +
                                        this['2#点位'].一氧化碳.num +
                                        this['2#点位'].一氧化碳.unit,
                                    })
                                  }
                                  break
                                case '氧气':
                                  if (
                                    res.data[i].listDataScenePoint[j].listHj212[
                                      k
                                    ].realData === null
                                  ) {
                                    this['2#点位'].氧气.num = '—'
                                    status.push(-1)
                                    break
                                  }
                                  this['2#点位'].氧气.num =
                                    res.data[i].listDataScenePoint[j].listHj212[
                                      k
                                    ].realData.value
                                  this['2#点位'].氧气.unit =
                                    res.data[i].listDataScenePoint[j].listHj212[
                                      k
                                    ].realUnit
                                  this['2#点位'].氧气.level =
                                    res.data[i].listDataScenePoint[j].listHj212[
                                      k
                                    ].level
                                  pointLevel.push(this['2#点位'].氧气.level)
                                  status.push(this['2#点位'].氧气.level)
                                  if (this['2#点位'].氧气.level === 0) {
                                    document.getElementById(
                                      'twoYangqi'
                                    ).style.color = '#0EA8A7'
                                  } else if (this['2#点位'].氧气.level === 1) {
                                    document.getElementById(
                                      'twoYangqi'
                                    ).style.color = '#FFCC99'
                                    this.warnAllList.push({
                                      info: res.data[i].listDataScenePoint[j]
                                        .listHj212[k],
                                      detail:
                                        '渗滤液坑道间-2#点位-氧气浓度超标，' +
                                        this['2#点位'].氧气.num +
                                        this['2#点位'].氧气.unit,
                                    })
                                  } else if (
                                    this['2#点位'].氧气.level === 2 ||
                                    this['2#点位'].氧气.level === 3
                                  ) {
                                    document.getElementById(
                                      'twoYangqi'
                                    ).style.color = '#FF9898'
                                    this.warnAllList.push({
                                      info: res.data[i].listDataScenePoint[j]
                                        .listHj212[k],
                                      detail:
                                        '渗滤液坑道间-2#点位-氧气浓度超标，' +
                                        this['2#点位'].氧气.num +
                                        this['2#点位'].氧气.unit,
                                    })
                                  }
                                  break

                                case '甲烷':
                                  if (
                                    res.data[i].listDataScenePoint[j].listHj212[
                                      k
                                    ].realData === null
                                  ) {
                                    this['2#点位'].甲烷.num = '—'
                                    status.push(-1)
                                    break
                                  }
                                  this['2#点位'].甲烷.num =
                                    res.data[i].listDataScenePoint[j].listHj212[
                                      k
                                    ].realData.value
                                  this['2#点位'].甲烷.unit =
                                    res.data[i].listDataScenePoint[j].listHj212[
                                      k
                                    ].realUnit
                                  this['2#点位'].甲烷.level =
                                    res.data[i].listDataScenePoint[j].listHj212[
                                      k
                                    ].level
                                  pointLevel.push(this['2#点位'].甲烷.level)
                                  status.push(this['2#点位'].甲烷.level)
                                  if (this['2#点位'].甲烷.level === 0) {
                                    document.getElementById(
                                      'twoJiawan'
                                    ).style.color = '#0EA8A7'
                                  } else if (this['2#点位'].甲烷.level === 1) {
                                    document.getElementById(
                                      'twoJiawan'
                                    ).style.color = '#FFCC99'
                                    this.warnAllList.push({
                                      info: res.data[i].listDataScenePoint[j]
                                        .listHj212[k],
                                      detail:
                                        '渗滤液坑道间-2#点位-甲烷浓度超标，' +
                                        this['2#点位'].甲烷.num +
                                        this['2#点位'].甲烷.unit,
                                    })
                                  } else if (
                                    this['2#点位'].甲烷.level === 2 ||
                                    this['2#点位'].甲烷.level === 3
                                  ) {
                                    document.getElementById(
                                      'twoJiawan'
                                    ).style.color = '#FF9898'
                                    this.warnAllList.push({
                                      info: res.data[i].listDataScenePoint[j]
                                        .listHj212[k],
                                      detail:
                                        '渗滤液坑道间-2#点位-甲烷浓度超标，' +
                                        this['2#点位'].甲烷.num +
                                        this['2#点位'].甲烷.unit,
                                    })
                                  }
                                  break
                              }
                            }
                            this['2#点位'].status = Math.max.apply(null, status)
                            break

                          case '0000sp3_20241119170232708Nmkqh':
                            var status = []
                            for (
                              let k = 0;
                              k <
                              res.data[i].listDataScenePoint[j].listHj212
                                .length;
                              k++
                            ) {
                              switch (
                                res.data[i].listDataScenePoint[j].listHj212[k]
                                  .name
                              ) {
                                case '一氧化碳':
                                  if (
                                    res.data[i].listDataScenePoint[j].listHj212[
                                      k
                                    ].realData === null
                                  ) {
                                    this['1期垃圾池'].一氧化碳.num = '—'
                                    status.push(-1)
                                    break
                                  }
                                  this['1期垃圾池'].一氧化碳.num =
                                    res.data[i].listDataScenePoint[j].listHj212[
                                      k
                                    ].realData.value

                                  this['1期垃圾池'].一氧化碳.unit =
                                    res.data[i].listDataScenePoint[j].listHj212[
                                      k
                                    ].realUnit
                                  this['1期垃圾池'].一氧化碳.level =
                                    res.data[i].listDataScenePoint[j].listHj212[
                                      k
                                    ].level
                                  // this['1期垃圾池'].一氧化碳.level = 1
                                  pointLevel.push(
                                    this['1期垃圾池'].一氧化碳.level
                                  )
                                  status.push(this['1期垃圾池'].一氧化碳.level)
                                  if (this['1期垃圾池'].一氧化碳.level === 0) {
                                    document.getElementById(
                                      'laOneYiyang'
                                    ).style.color = '#0EA8A7'
                                  } else if (
                                    this['1期垃圾池'].一氧化碳.level === 1
                                  ) {
                                    document.getElementById(
                                      'laOneYiyang'
                                    ).style.color = '#FFCC99'
                                    // document.getElementById("一号点位一氧化碳").style.setProperty("color", "#FFCC99", "important");
                                    this.warnAllList.push({
                                      info: res.data[i].listDataScenePoint[j]
                                        .listHj212[k],
                                      detail:
                                        '垃圾池-1期垃圾池-一氧化碳浓度超标，' +
                                        this['1期垃圾池'].一氧化碳.num +
                                        this['1期垃圾池'].一氧化碳.unit,
                                    })
                                  } else if (
                                    this['1期垃圾池'].一氧化碳.level === 2 ||
                                    this['1期垃圾池'].一氧化碳.level === 3
                                  ) {
                                    document.getElementById(
                                      'laOneYiyang'
                                    ).style.color = '#FF9898'
                                    this.warnAllList.push({
                                      info: res.data[i].listDataScenePoint[j]
                                        .listHj212[k],
                                      detail:
                                        '垃圾池-1期垃圾池-一氧化碳浓度超标，' +
                                        this['1期垃圾池'].一氧化碳.num +
                                        this['1期垃圾池'].一氧化碳.unit,
                                    })
                                  }
                                  break
                                case '硫化氢':
                                  if (
                                    res.data[i].listDataScenePoint[j].listHj212[
                                      k
                                    ].realData === null
                                  ) {
                                    this['1期垃圾池'].硫化氢.num = '—'
                                    status.push(-1)
                                    break
                                  }
                                  this['1期垃圾池'].硫化氢.num =
                                    res.data[i].listDataScenePoint[j].listHj212[
                                      k
                                    ].realData.value
                                  // console.log(res.data[i].listDataScenePoint[j].name,'cececece',this['1期垃圾池'].硫化氢.num );
                                  this['1期垃圾池'].硫化氢.unit =
                                    res.data[i].listDataScenePoint[j].listHj212[
                                      k
                                    ].realUnit
                                  this['1期垃圾池'].硫化氢.level =
                                    res.data[i].listDataScenePoint[j].listHj212[
                                      k
                                    ].level
                                  pointLevel.push(
                                    this['1期垃圾池'].硫化氢.level
                                  )
                                  status.push(this['1期垃圾池'].硫化氢.level)
                                  if (this['1期垃圾池'].硫化氢.level === 0) {
                                    document.getElementById(
                                      'laOneLiuhuaqing'
                                    ).style.color = '#0EA8A7'
                                  } else if (
                                    this['1期垃圾池'].硫化氢.level === 1
                                  ) {
                                    document.getElementById(
                                      'laOneLiuhuaqing'
                                    ).style.color = '#FFCC99'
                                    this.warnAllList.push({
                                      info: res.data[i].listDataScenePoint[j]
                                        .listHj212[k],
                                      detail:
                                        '垃圾池-1期垃圾池-硫化氢浓度超标，' +
                                        this['1期垃圾池'].硫化氢.num +
                                        this['1期垃圾池'].硫化氢.unit,
                                    })
                                  } else if (
                                    this['1期垃圾池'].硫化氢.level === 2 ||
                                    this['1期垃圾池'].硫化氢.level === 3
                                  ) {
                                    document.getElementById(
                                      'laOneLiuhuaqing'
                                    ).style.color = '#FF9898'
                                    this.warnAllList.push({
                                      info: res.data[i].listDataScenePoint[j]
                                        .listHj212[k],
                                      detail:
                                        '垃圾池-1期垃圾池-硫化氢浓度超标，' +
                                        this['1期垃圾池'].硫化氢.num +
                                        this['1期垃圾池'].硫化氢.unit,
                                    })
                                  }
                                  break
                                case '氧气':
                                  if (
                                    res.data[i].listDataScenePoint[j].listHj212[
                                      k
                                    ].realData === null
                                  ) {
                                    this['1期垃圾池'].氧气.num = '—'
                                    status.push(-1)
                                    break
                                  }
                                  this['1期垃圾池'].氧气.num =
                                    res.data[i].listDataScenePoint[j].listHj212[
                                      k
                                    ].realData.value
                                  this['1期垃圾池'].氧气.unit =
                                    res.data[i].listDataScenePoint[j].listHj212[
                                      k
                                    ].realUnit
                                  this['1期垃圾池'].氧气.level =
                                    res.data[i].listDataScenePoint[j].listHj212[
                                      k
                                    ].level
                                  pointLevel.push(this['1期垃圾池'].氧气.level)
                                  status.push(this['1期垃圾池'].氧气.level)
                                  if (this['1期垃圾池'].氧气.level === 0) {
                                    document.getElementById(
                                      'laOneYangqi'
                                    ).style.color = '#0EA8A7'
                                  } else if (
                                    this['1期垃圾池'].氧气.level === 1
                                  ) {
                                    document.getElementById(
                                      'laOneYangqi'
                                    ).style.color = '#FFCC99'
                                    this.warnAllList.push({
                                      info: res.data[i].listDataScenePoint[j]
                                        .listHj212[k],
                                      detail:
                                        '垃圾池-1期垃圾池-氧气浓度超标，' +
                                        this['1期垃圾池'].氧气.num +
                                        this['1期垃圾池'].氧气.unit,
                                    })
                                  } else if (
                                    this['1期垃圾池'].氧气.level === 2 ||
                                    this['1期垃圾池'].氧气.level === 3
                                  ) {
                                    document.getElementById(
                                      'laOneYangqi'
                                    ).style.color = '#FF9898'
                                    this.warnAllList.push({
                                      info: res.data[i].listDataScenePoint[j]
                                        .listHj212[k],
                                      detail:
                                        '垃圾池-1期垃圾池-氧气浓度超标，' +
                                        this['1期垃圾池'].氧气.num +
                                        this['1期垃圾池'].氧气.unit,
                                    })
                                  }
                                  break
                                case '甲烷':
                                  if (
                                    res.data[i].listDataScenePoint[j].listHj212[
                                      k
                                    ].realData === null
                                  ) {
                                    this['1期垃圾池'].甲烷.num = '—'
                                    status.push(-1)
                                    break
                                  }
                                  this['1期垃圾池'].甲烷.num =
                                    res.data[i].listDataScenePoint[j].listHj212[
                                      k
                                    ].realData.value
                                  this['1期垃圾池'].甲烷.unit =
                                    res.data[i].listDataScenePoint[j].listHj212[
                                      k
                                    ].realUnit
                                  this['1期垃圾池'].甲烷.level =
                                    res.data[i].listDataScenePoint[j].listHj212[
                                      k
                                    ].level
                                  pointLevel.push(this['1期垃圾池'].甲烷.level)
                                  status.push(this['1期垃圾池'].甲烷.level)
                                  if (this['1期垃圾池'].甲烷.level === 0) {
                                    document.getElementById(
                                      'laOneJiawan'
                                    ).style.color = '#0EA8A7'
                                  } else if (
                                    this['1期垃圾池'].甲烷.level === 1
                                  ) {
                                    document.getElementById(
                                      'laOneJiawan'
                                    ).style.color = '#FFCC99'
                                    this.warnAllList.push({
                                      info: res.data[i].listDataScenePoint[j]
                                        .listHj212[k],
                                      detail:
                                        '垃圾池-1期垃圾池-甲烷浓度超标，' +
                                        this['1期垃圾池'].甲烷.num +
                                        this['1期垃圾池'].甲烷.unit,
                                    })
                                  } else if (
                                    this['1期垃圾池'].甲烷.level === 2 ||
                                    this['1期垃圾池'].甲烷.level === 3
                                  ) {
                                    document.getElementById(
                                      'laOneJiawan'
                                    ).style.color = '#FF9898'
                                    this.warnAllList.push({
                                      info: res.data[i].listDataScenePoint[j]
                                        .listHj212[k],
                                      detail:
                                        '垃圾池-1期垃圾池-甲烷浓度超标，' +
                                        this['1期垃圾池'].甲烷.num +
                                        this['1期垃圾池'].甲烷.unit,
                                    })
                                  }
                                  break
                              }
                            }
                            this['1期垃圾池'].status = Math.max.apply(
                              null,
                              status
                            )
                            break

    }
                      }
                      if (pointLevel.length !== 0) {
                        this.warnBox[0] = Math.max.apply(null, pointLevel)
                      } else {
                        this.warnBox[0] = 0
                      }
                      break
                  }
                }
                // 全局报警 取最高等级
                this.warnAll = Math.max.apply(null, this.warnBox)
                console.log('全局最高报警等级', this.warnAll, this.warnAllList)
                // if(this.warnAll!==0) {
                //     this.maskVisible = true
                //     this.getWarnNoticeList()
                // } else{
                //     this.maskVisible = false
                // }
              } else {
                // this.showTips(res.message, 70, 5)
                console.log(res.message)
              }
            })
            // 更新数字闪一下
            this.numVisible = false
            setTimeout(() => {
              this.numVisible = true
            }, 20)
          },

          getWarnNoticeList() {
            // warnNoticeList({ cmsUserId: this.cmsUserId, departmentIds: this.departmentIds, type: 1 }).then((res) => {
            warnNoticeList({
              cmsUserId: this.cmsUserId,
              departmentIds: this.departmentIds,
              type: 1,
            }).then((res) => {
              console.log('报警列表', res)
              if (res.data.length > 0) {
                this.maskVisible = true
                this.noticeList = res.data
              } else {
                this.maskVisible = false
                this.noticeList = []
              }
            })
          },
          // 获取报警列表
          getWarnList() {
            // alarmList({ cmsUserId: this.cmsUserId, departmentIds: this.departmentIds, typePid: '1,2', status: '1,2,3,4,7' }).then((res) => {
            alarmList({
              departmentIds: this.departmentIds,
              cmsUserId: this.cmsUserId,
              typePid: '1,2',
              status: '1,2,3,4,7',
            }).then((res) => {
              console.log('报警列表', res)
              this.warnList = res.data
            })
          },
          // 获取电子锁进出记录列表
          // getLockList() {
          //     lockList({ cmsUserId: this.cmsUserId, departmentIds: this.departmentIds, ptype: 3 }).then((res) => { // 	ptype平台类型：1运维平台；3客户平台
          //         console.log('电子锁进出记录列表', res)
          //         this.recordList = res.data
          //         // this.recordList = []

          //         this.recordListScroll()
          //     })
          // },
          // 显示当前时间（年月日时分秒）
          timeFormate(timeStamp) {
            const year = new Date(timeStamp).getFullYear()
            const month =
              new Date(timeStamp).getMonth() + 1 < 10
                ? '0' + (new Date(timeStamp).getMonth() + 1)
                : new Date(timeStamp).getMonth() + 1
            const date =
              new Date(timeStamp).getDate() < 10
                ? '0' + new Date(timeStamp).getDate()
                : new Date(timeStamp).getDate()
            const hh =
              new Date(timeStamp).getHours() < 10
                ? '0' + new Date(timeStamp).getHours()
                : new Date(timeStamp).getHours()
            const mm =
              new Date(timeStamp).getMinutes() < 10
                ? '0' + new Date(timeStamp).getMinutes()
                : new Date(timeStamp).getMinutes()
            const ss =
              new Date(timeStamp).getSeconds() < 10
                ? '0' + new Date(timeStamp).getSeconds()
                : new Date(timeStamp).getSeconds()
            this.datetime =
              year +
              '年' +
              month +
              '月' +
              date +
              '日' +
              ' ' +
              hh +
              ':' +
              mm +
              ':' +
              ss
          },
          nowTimes() {
            this.timeFormate(new Date())
            setInterval(this.nowTimes, 1000)
            this.clear()
          },
          clear() {
            clearInterval(this.nowTimes)
            this.nowTimes = null
          },

          showHistory(e) {
            console.log(e);
            console.log('查看历史数据', this[e])
            this.historyVisible = true
            this.lineVisible = false
            this.historyLineTitle =
              this[e].scenePointName + ' ' + this[e].pointName

            this.dialogTitleName = e

            var startTime = moment()
              .subtract(0.6, 'hours')
              .format('YYYY-MM-DD HH:mm:ss')
            var endTime = moment().format('YYYY-MM-DD HH:mm:ss')
            console.log(startTime,endTime);
            sensorHistory({
              dataType: 1,
              cmsUserId: this.cmsUserId,
              sceneId: this[e].sceneId,
              scenePointId: this[e].scenePointId,
              startTime: startTime,
              endTime: endTime,
              dateType: 0,
              descDevTime: 1,
            }).then((res) => {
              this.lineVisible = true
              this.historyLineData = res.data
              this.historyLineName = []
              this.historyLineMonth = []
              for (var i = 0; i < res.data.length; i++) {
                this.historyLineName[i] = res.data[i].name
              }
              for (var j = 0; j < res.data[0].listRecordData.length; j++) {
                this.historyLineMonth[j] = res.data[0].listRecordData[j].key
              }

              this.drawHistoryLine()
            })
          },
          drawHistoryLine() {
            var chartDom = document.getElementById('historyLine')
            var myChart = echarts.init(chartDom)
            var option
            var series = []
            console.log('测试', series)
            // this.historyLineMonth = this.historyLineMonth.slice().reverse()
            for (var i = 0; i < this.historyLineData.length; i++) {
              const data = []
              for (
                var j = 0;
                j < this.historyLineData[i].listRecordData.length;
                j++
              ) {
                data[j] = this.historyLineData[i].listRecordData[j].value
              }

              series[i] = {
                name: this.historyLineData[i].name,
                type: 'line',
                symbol: 'none',
                smooth: true,
                // color: 'rgba(255, 141, 26, 1)',
                itemStyle: {
                  // color: 'rgba(255, 141, 26, 1)',
                  normal: {
                    lineStyle: {
                      // 系列级个性化折线样式
                      width: 2,
                      type: 'solid',
                      // color: 'rgba(255, 141, 26, 1)'// 线条渐变色
                    },
                  },
                }, // 线条样式
                data: data,
              }
            }
            option = {
              tooltip: {
                trigger: 'axis',
              },
              legend: {
                data: this.historyLineName,
                right: '5%',
                textStyle: {
                  color: 'rgba(255, 255, 255, 0.8)',
                },
              },
              grid: {
                left: '0',
                right: '5%',
                bottom: '3%',
                containLabel: true,
              },
              dataZoom: [
                {
                  type: 'inside', //x轴
                  xAxisIndex: 0,
                  zoomOnMouseWheel: true, //如何触发缩放。可选值为：true：表示不按任何功能键，鼠标滚轮能触发缩放。false：表示鼠标滚轮不能触发缩放。'shift'：表示按住 shift 和鼠标滚轮能触发缩放。'ctrl'：表示按住 ctrl 和鼠标滚轮能触发缩放。'alt'：表示按住 alt 和鼠标滚轮能触发缩放。
                },
              ],
              xAxis: {
                type: 'category',
                boundaryGap: false,
                data: this.historyLineMonth,
                axisLine: {
                  show: true,
                  lineStyle: {
                    color: 'rgba(255, 255, 255, 0.8)',
                  },
                },
              },
              yAxis: {
                type: 'value',
                splitLine: {
                  show: true,
                  lineStyle: {
                    type: 'solid',
                    color: 'rgba(77, 91, 107, 1)',
                  },
                },
                axisLine: {
                  show: false,
                  lineStyle: {
                    color: 'rgba(255, 255, 255, 0.8)',
                  },
                },
              },
              series: series,
            }

            option && myChart.setOption(option, true)
            window.addEventListener('resize', function () {
              myChart.resize()
            })
          },
          closeBox() {
            this.active = 1
            this.historyVisible = false
            this.lineVisible = false
          },
          // 列表-滚动---只调用一次
          warnListScroll() {
            const that = this
            // 表格滚动---停止定时器
            this.stopInterval(this.warnListTimer)
            this.stopAnimate('.warnList ul')

            if (this.warnList.length > 4) {
              // 开始滚动
              this.warnListScrollAction()
              // 鼠标移入移出时的操作
              $('.warnList')
                .mouseenter(function () {
                  // 实现当鼠标移动到box上时，不执行自动轮播功能
                  console.log('warnListTimer---stop', 2)
                  that.stopInterval(that.warnListTimer)
                  that.stopAnimate('.warnList ul')
                })
                .mouseleave(function () {
                  that.warnListScrollAction()
                })

              // 鼠标上下滚动操作
              $('.warnList').on('mousewheel DOMMouseScroll', function (event) {
                var delta =
                  (event.originalEvent.wheelDelta &&
                    (event.originalEvent.wheelDelta > 0 ? 1 : -1)) ||
                  (event.originalEvent.detail &&
                    (event.originalEvent.detail > 0 ? -1 : 1))
                if (delta > 0) {
                  // 向上滚
                  $('.warnList ul li')
                    .slice(that.warnList.length - 1, that.warnList.length)
                    .prependTo($('.warnList ul'))
                  $('.warnList ul').css({ marginTop: 0 })
                } else if (delta < 0) {
                  // 向下滚
                  $('.warnList ul li').slice(0, 1).appendTo($('.warnList ul'))
                  $('.warnList ul').css({ marginTop: 0 })
                }
                event.preventDefault && event.preventDefault()
                return false
              })
            }
          },
          // 列表滚动开始
          warnListScrollAction() {
            if (this.warnList.length > 4) {
              console.log('warnListTimer---start', 1)
              this.warnListTimer = setInterval(() => {
                $('.warnList ul').animate(
                  { marginTop: '-2.75rem' },
                  this.warnListTime,
                  'linear',
                  function () {
                    $('.warnList ul li').slice(0, 1).appendTo($('.warnList ul'))
                    $('.warnList ul').css({ marginTop: 0 })
                  }
                )
              }, this.warnListTime + 15)
            }
          },
          // 点击列表改变样式
          changeWarnLi(item, index) {
            this.warnList.map((item) => {
              item.isClick = false
            })
            item.isClick = true
          },
          changeWarnLiCancel() {
            this.warnList.map((item) => {
              item.isClick = false
            })
          },
          // 列表-滚动---只调用一次
          recordListScroll() {
            const that = this
            // 表格滚动---停止定时器
            this.stopInterval(this.recordListTimer)
            this.stopAnimate('.recordList ul')

            if (this.recordList.length > 3) {
              // 开始滚动
              this.recordListScrollAction()
              // 鼠标移入移出时的操作
              $('.recordList')
                .mouseenter(function () {
                  // 实现当鼠标移动到box上时，不执行自动轮播功能
                  console.log('recordListTimer---stop', 2)
                  that.stopInterval(that.recordListTimer)
                  that.stopAnimate('.recordList ul')
                })
                .mouseleave(function () {
                  that.recordListScrollAction()
                })

              // 鼠标上下滚动操作
              $('.recordList').on(
                'mousewheel DOMMouseScroll',
                function (event) {
                  var delta =
                    (event.originalEvent.wheelDelta &&
                      (event.originalEvent.wheelDelta > 0 ? 1 : -1)) ||
                    (event.originalEvent.detail &&
                      (event.originalEvent.detail > 0 ? -1 : 1))
                  if (delta > 0) {
                    // 向上滚
                    $('.recordList ul li')
                      .slice(that.recordList.length - 1, that.recordList.length)
                      .prependTo($('.recordList ul'))
                    $('.recordList ul').css({ marginTop: 0 })
                  } else if (delta < 0) {
                    // 向下滚
                    $('.recordList ul li')
                      .slice(0, 1)
                      .appendTo($('.recordList ul'))
                    $('.recordList ul').css({ marginTop: 0 })
                  }
                  event.preventDefault && event.preventDefault()
                  return false
                }
              )
            }
          },
          // 列表滚动开始
          recordListScrollAction() {
            if (this.recordList.length > 3) {
              console.log('recordListTimer---start', 1)
              this.recordListTimer = setInterval(() => {
                $('.recordList ul').animate(
                  { marginTop: '-2.75rem' },
                  this.recordListTime,
                  'linear',
                  function () {
                    $('.recordList ul li')
                      .slice(0, 1)
                      .appendTo($('.recordList ul'))
                    $('.recordList ul').css({ marginTop: 0 })
                  }
                )
              }, this.recordListTime + 15)
            }
          },

          // 点击列表改变样式
          changeRecordLi(item, index) {
            this.recordList.map((item) => {
              item.isClick = false
            })
            item.isClick = true
          },
          changeRecordLiCancel() {
            this.recordList.map((item) => {
              item.isClick = false
            })
          },
          // 停止定时器
          stopInterval(interval) {
            if (interval != '') {
              clearInterval(interval)
              interval = ''
            }
          },
          stopAnimate(domName, stopAll, goToEnd) {
            if (stopAll == undefined || stopAll == null) {
              stopAll = true
            }
            if (goToEnd == undefined || goToEnd == null) {
              goToEnd = true
            }
            $(domName).stop(stopAll, goToEnd)
          },
          // 遮罩闪烁
          maskShake() {
            var timer1 = setInterval(colorLiner, 1)
            var val1 = 100
            function colorLiner() {
              var Div = document.getElementById('mask')
              if (val1 >= 0) {
                Div.style.opacity = val1 / 100
              }
              if (val1 < 0) {
                Div.style.opacity = -val1 / 100
              }
              if (val1 == -100) {
                //由-100变为正100
                val1 = -val1
              }
              val1--
            }
          },

          // 确认按钮反馈
          maskConfirm() {
            var pnos = this.noticeList.map((item) => {
              return item.icode
            })
            warnNoticeEnsure({
              operatorId: this.cmsUserId,
              pnos: pnos.toString(),
            }).then((res) => {
              if (res.code === 0) {
                // this.showTipsGreen('报警确认成功', 70, 5)
                this.maskVisible = false
              } else {
                // this.showTips(res.message, 70, 5)
                console.log(res.message)
              }
            })
          },
          changeButton(num) {
            // console.log(this.value1)
            this.active = num
            this.historyLineName = []
            this.historyLineMonth = []
            this.lineVisible = false
            this.value1 = [new Date(), new Date()]
            if (num == 1) {
              var startTime = moment()
                .subtract(0.6, 'hours')
                .format('YYYY-MM-DD HH:mm:ss')
              var endTime = moment().format('YYYY-MM-DD HH:mm:ss')

              sensorHistory({
                dataType: 1,
                cmsUserId: this.cmsUserId,
                sceneId: this[this.dialogTitleName].sceneId,
                scenePointId: this[this.dialogTitleName].scenePointId,
                startTime: startTime,
                endTime: endTime,
                dateType: 0,
                descDevTime: 1,
              }).then((res) => {
                this.lineVisible = true
                this.historyLineData = res.data
                this.historyLineName = []
                this.historyLineMonth = []
                for (var i = 0; i < res.data.length; i++) {
                  this.historyLineName[i] = res.data[i].name
                }
                for (var j = 0; j < res.data[0].listRecordData.length; j++) {
                  this.historyLineMonth[j] = res.data[0].listRecordData[j].key
                }

                this.drawHistoryLine()
              })
            } else {
              sensorHistory({
                dataType: 1,
                cmsUserId: this.cmsUserId,
                sceneId: this[this.dialogTitleName].sceneId,
                scenePointId: this[this.dialogTitleName].scenePointId,
                startTime: this.formatDate(this.value1[0]),
                endTime: this.formatDate(this.value1[1]),
                dateType: 0,
                descDevTime: 1,
              }).then((res) => {
                this.lineVisible = true
                this.historyLineData = res.data
                this.historyLineName = []
                this.historyLineMonth = []
                for (var i = 0; i < res.data.length; i++) {
                  this.historyLineName[i] = res.data[i].name
                }
                for (var j = 0; j < res.data[0].listRecordData.length; j++) {
                  this.historyLineMonth[j] = res.data[0].listRecordData[j].key
                }

                this.drawHistoryLine()
              })
            }
          },
          chooseDate() {
            this.historyLineName = []
            this.historyLineMonth = []
            this.lineVisible = false
            sensorHistory({
              dataType: 1,
              cmsUserId: this.cmsUserId,
              sceneId: this[this.dialogTitleName].sceneId,
              scenePointId: this[this.dialogTitleName].scenePointId,
              startTime: this.value1[0],
              endTime: this.value1[1],
              dateType: 0,
              descDevTime: 1,
            }).then((res) => {
              this.lineVisible = true
              this.historyLineData = res.data
              this.historyLineName = []
              this.historyLineMonth = []
              for (var i = 0; i < res.data.length; i++) {
                this.historyLineName[i] = res.data[i].name
              }
              for (var j = 0; j < res.data[0].listRecordData.length; j++) {
                this.historyLineMonth[j] = res.data[0].listRecordData[j].key
              }

              this.drawHistoryLine()
            })
          },
        },
        destroyed: function () {
          console.log('离开页面清除定时')
          clearInterval(this.iCount)
        },
      })
    </script>
  </body>
</html>
